package com.learning.JavaSE.module1.task4;
/*
 *编程使用if分支结构模拟网吧上网的过程
 */
import java.util.Scanner;

public class IfTest {
    public static void main(String[] args) {
        //scanner
        System.out.println("请输入您的年龄");
        Scanner sc = new Scanner(System.in);
        int age = sc.nextInt();
        if(age >= 18){
            System.out.println("开心的浏览起了网页");
        }
        System.out.println("上网结束");
    }
}
